home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_mirrorlock.cog < prev    next >
Text File  |  1999-11-15  |  7KB  |  224 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_Mirrorlock.cog
  4. #
  5. # Raise the MirrorLock Statue. Stage one.
  6. #
  7. # [SXC]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.  
  14.     message     startup
  15.     message     entered
  16.     message     user0
  17.     
  18.     cog         hintcog
  19.     
  20.     sound       statsound
  21.     sound       snakesound
  22.     sound       statstop
  23.     sound       awesomewav=mus_teo_statuerise.wav local
  24.         
  25.     surface     snakesurf0      linkid=2    mask=080
  26.     surface     snakesurf1      linkid=2    mask=080
  27.     surface     snakesurf2      linkid=2    mask=080
  28.     
  29.     surface     trigrsurf0      linkid=3    mask=080   
  30.     surface     trigrsurf1      linkid=3    mask=080
  31.     surface     trigrsurf2      linkid=3    mask=080
  32.  
  33.     thing        statue
  34.     thing        column
  35.     thing       column1
  36.     thing       column2
  37.     thing       gear
  38.     thing       sidedoor
  39.     thing       sidedoorcam
  40.     thing       sidedoorcamfocus
  41.  
  42.     thing        snakehead0        linkid=4        
  43.     thing       snakehead1        linkid=4
  44.     thing       snakehead2        linkid=4        
  45.         
  46.     thing       ghostcampos
  47.  
  48.     flex        camTime
  49.     int         grindsound
  50.     int         moveSpeed
  51.     int            locked = 0        local
  52.     int            democheck = 0    local
  53.     int            stage = 0          local
  54.     thing       player          local
  55.     int         statline=0      local
  56.     
  57. end
  58.  
  59. # ========================================================================================
  60.  
  61. code
  62.  
  63. startup:
  64.  
  65.     player = GetLocalPlayerThing();
  66.     
  67. return;
  68.  
  69. # ........................................................................................
  70. entered:
  71.  
  72.     if ((GetSenderID() == 2) &&
  73.             (democheck == 0))
  74.     {
  75.         if (GetSourceRef() == snakehead0)
  76.         {
  77.             stage = stage + 1;
  78.             ClearThingFlags(snakehead0, 0x40000000);
  79.             SendMessage(hintcog, user6);
  80.         }
  81.         else if (GetSourceRef() == snakehead1)
  82.         {
  83.             stage = stage + 1;
  84.             ClearThingFlags(snakehead1, 0x40000000);
  85.             SendMessage(hintcog, user5);
  86.         }
  87.         else if (GetSourceRef() == snakehead2)
  88.         {
  89.             stage = stage + 1;
  90.             ClearThingFlags(snakehead2, 0x40000000);
  91.             SendMessage(hintcog, user4);
  92.         }
  93.         
  94.         // move stat based on stage state
  95.         if (stage == 1)
  96.         {
  97.             StartCutscene(1);
  98.             Sleep(0.25);
  99.             PlaySoundLocal(snakesound, 1, 0, 0x00, 1);
  100.             SetActorFlags(player, 0x200000);
  101.             StopThing(player);
  102.             PlayMode(player, 1, 0);
  103.             grindsound = PlaySoundThing(statsound, statue, 1, 30, 50, 0x0081);
  104.             SetCollideType(statue, 0);
  105.             SetCollideType(column, 0);
  106.             SetCollideType(gear, 0);
  107.             MoveToFrame(statue, 1, moveSpeed);
  108.             MoveToFrame(column, 1, moveSpeed);
  109.             MoveToFrame(column1, 1, moveSpeed);
  110.             MoveToFrame(column2, 1, moveSpeed);
  111.             MoveToFrame(gear, 1, moveSpeed);
  112.             SetCameraFocus(2, ghostcampos);
  113.             SetCameraSecondaryFocus(2, gear);
  114.             SetCurrentCamera(2);
  115.             SetCameraFOV(110, 0, 0);
  116.             PlaySoundLocal(awesomewav, 1, 0, 0, 0);
  117.             WaitForStop(column);
  118.             StopSound(grindsound, 0);
  119.             PlaySoundThing(statstop, statue, 1, 10, 20, 0);
  120.             SetCollideType(statue, 3);
  121.             SetCollideType(column, 3);
  122.             SetCollideType(gear, 3);
  123.             Sleep(1);
  124.             ClearActorFlags(player, 0x200000);
  125.             //SetCameraFocus(1, player);
  126.             SetCurrentCamera(1);
  127.             SetCameraFOV(90, 0, 0);
  128.             EndCutscene();
  129.         }
  130.         else if (stage == 2)
  131.         {
  132.             StartCutscene(1);
  133.             Sleep(0.25);
  134.             PlaySoundLocal(snakesound, 1, 0, 0x00, 1);
  135.             SetActorFlags(player, 0x200000);
  136.             StopThing(player);     
  137.             PlayMode(player, 1, 0);
  138.             grindsound = PlaySoundThing(statsound, statue, 1, 30, 50, 0x0081);
  139.             SetCollideType(statue, 0);
  140.             SetCollideType(column, 0);
  141.             SetCollideType(gear, 0);
  142.             MoveToFrame(statue, 2, moveSpeed);
  143.             MoveToFrame(column, 2, moveSpeed);
  144.             MoveToFrame(column1, 2, moveSpeed); 
  145.             MoveToFrame(column2, 2, moveSpeed); 
  146.             MoveToFrame(gear, 2, moveSpeed);
  147.             SetCameraFocus(2, ghostcampos);
  148.             SetCameraSecondaryFocus(2, gear);
  149.             SetCurrentCamera(2);
  150.             SetCameraFOV(110, 0, 0);
  151.             WaitForStop(column);
  152.             StopSound(grindsound, 0);
  153.             PlaySoundThing(statstop, statue, 1, 10, 20, 0);
  154.             SetCollideType(statue, 3);
  155.             SetCollideType(column, 3);
  156.             SetCollideType(gear, 3);
  157.             Sleep(1);
  158.             ClearActorFlags(player, 0x200000);
  159.             SetCurrentCamera(1);
  160.             SetCameraFOV(90, 0, 0);
  161.             EndCutscene();
  162.         }
  163.         else if (stage == 3)
  164.         {
  165.             StartCutscene(1);
  166.             Sleep(0.25);
  167.             PlaySoundLocal(snakesound, 1, 0, 0x00, 1);
  168.             SetActorFlags(player, 0x200000);
  169.             StopThing(player);
  170.             PlayMode(player, 1, 0);
  171.             grindsound = PlaySoundThing(statsound, statue, 1, 30, 50, 0x0081);
  172.             SetCollideType(statue, 0);
  173.             SetCollideType(column, 0);
  174.             SetCollideType(gear, 0);
  175.             MoveToFrame(statue, 3, moveSpeed);
  176.             MoveToFrame(column, 3, moveSpeed);
  177.             MoveToFrame(column1, 3, moveSpeed); 
  178.             MoveToFrame(column2, 3, moveSpeed); 
  179.             MoveToFrame(gear, 3, moveSpeed);
  180.             SetCameraFocus(2, ghostcampos);
  181.             SetCameraSecondaryFocus(2, gear);
  182.             SetCurrentCamera(2);
  183.             SetCameraFOV(110, 0, 0);
  184.             WaitForStop(column);
  185.             StopSound(grindsound, 0);
  186.             PlaySoundThing(statstop, statue, 1, 10, 20, 0);
  187.             SetCollideType(statue, 3);
  188.             SetCollideType(column, 3);
  189.             SetCollideType(gear, 3);
  190.             Sleep(1);
  191.             SetCameraFocus(2, sidedoorcam);
  192.             SetCameraSecondaryFocus(2, sidedoorcamfocus);
  193.             SetCurrentCamera(2);
  194.             MoveToFrame(sidedoor, 1, moveSpeed);
  195.             SetCameraFOV(70, 1, 2);
  196.             WaitForStop(sidedoor);
  197.             Sleep(1);
  198.             ClearActorFlags(player, 0x200000);          
  199.             ResetCameraFOV(0, 0.0);
  200.             SetCurrentCamera(1);
  201.             SetThingMoveSize(column, 0.1);
  202.             EndCutscene();
  203.         }                                
  204.     }
  205.     
  206. return;
  207.  
  208. # ........................................................................................
  209. user0:
  210.  
  211.     democheck = 1;
  212.     MoveToFrame(statue, 3, moveSpeed);
  213.     MoveToFrame(column, 3, moveSpeed);
  214.     MoveToFrame(column1, 3, moveSpeed); 
  215.     MoveToFrame(column2, 3, moveSpeed); 
  216.     MoveToFrame(gear, 3, moveSpeed); 
  217.     
  218. return;
  219.  
  220. # ........................................................................................
  221.  
  222. end
  223.  
  224.